# 作者:路伯阳
# 2025年02月28日14时04分25秒
# 846151791@qq.com
name_list = ["zhangsan", "lisi", "wangwu"]
# 查
print(name_list[2])
print(name_list.index('wangwu'))
# 修改
name_list[1] = "李四"
print(name_list)
# 增加
name_list.append("wangxiaoer")
print(name_list)
name_list.insert(4, "wangxingyan")
print(name_list)
name_list.insert(0, "wangxiaomei")
print(name_list)
print(f'id(name_list) = {id(name_list)}')
temp_list = ['laoda', "laoer", "laosan"]
name_list.extend(temp_list)
print(name_list)

name_list.remove("wangwu")
print(name_list)
name_list.pop()
print(name_list)
name_list.pop(1)
print(name_list)

del name_list[1]
print(name_list)

name_list.clear()
print(name_list)
print(f'clear之后id(name_list) = {id(name_list)}')
